<div class="row animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="panel panel-default">
    <div class="panel-heading">
      <a ng-click="discard()" href="javascript:;"><i class="backBtn fa fa-arrow-circle-left"></i></a>
      <span class="panelTitle" ng-bind="TagForm.title"></span>
    </div>
    <div class="panel-body">
      <form novalidate name="tagForm" class="form-horizontal" role="form">
        <div class="form-group" ng-class="{'has-error': tagForm.name.$invalid && tagForm.name.$dirty}">
          <label class="control-label col-xs-3 col-md-2">标签名称：</label>
          <div class=" col-xs-7 col-md-8">
            <input type="text" class="form-control w25c" name="name" placeholder="标签名称" ng-model="tag.name" required>
          </div>
          <div class="col-xs-2 col-md-2" ng-show="tagForm.name.$dirty && tagForm.name.$invalid">
            <span class="text-danger" ng-show="tagForm.name.$error.required">请输入标签名称</span>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': tagForm.weight.$invalid && tagForm.weight.$dirty}">
          <label class="col-xs-3 col-md-2 control-label">权重：</label>
          <div class="col-xs-7 col-md-8">
            <input type="number" name="weight" class="form-control w25c" placeholder="权重" ng-model="tag.weight">
          </div>
          <div class="col-xs-2 col-md-2" ng-show="tagForm.weight.$dirty && tagForm.value.$invalid">
            <span class="text-danger" ng-show="tagForm.weight.$error.required">请输入权重</span>
          </div>
        </div>
        <div class="form-group">
          <div class="col-xs-4 col-xs-offset-2">
            <button class="btn btn-primary" ng-click="submitForm()" ng-disabled="tagForm.$invalid">保存</button>
            <button class="btn btn-white" ng-click="discard()">取消</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>